(function(angular) {
	'use strict';
	angular.module('fs.waf').controller('waf.test.bootstrap.dropdown.demoController', function($scope, $log) {
		$scope.items = [ {
			name : 'The first choice!',
			state : 'bootstrap.accordion.AccordionDemo'
		}, {
			name : 'And another choice for you.',
			state : 'b'
		}, {
			name : 'but wait! A third!',
			state : 'c'
		} ];

		$scope.status = {
			isopen : false
		};

		$scope.toggled = function(open) {
			$log.log('Dropdown is now: ', open);
		};

		$scope.toggleDropdown = function($event) {
			$event.preventDefault();
			$event.stopPropagation();
			$scope.status.isopen = !$scope.status.isopen;
		};

		$scope.appendToEl = angular.element(document.querySelector('#dropdown-long-content'));
	});
})(angular);